package hu.pixelesztergalyos.continuity;

import java.io.IOException;

//Transition Block class for detecting if the character has reached the edge of the mosaic
public class TransitionBlock extends MosaicElement implements Collideable {
	public TransitionType type;

	// Constructor - type has given
	public TransitionBlock(TransitionType type) {
		super();
		this.type = type;

	}

	//Construct in the given origin and type
	public TransitionBlock(float x, float y, TransitionType type) {
		super(x, y);
		this.type = type;
	}

	// The TransitionBlock has collided with a Character
	// logic in Character.hitBy()
	public void hitBy(Character character) throws IOException {
		character.hitBy(this);
	}

	// The TransitionBlock has collided with a BuildingBlock
	// never occurs
	public void hitBy(BuildingBlock buildingBlock) {
		// empty
	}

	// The TransitionBlock has collided with the Gate
	// never occurs
	public void hitBy(Gate gate) {
		// empty
	}

	// The TransitionBlock has collided with the Key
	// never occurs
	public void hitBy(Key key) {
		// empty
	}

	// The TransitionBlock has collided with another TransitionBlock
	// never occurs
	public void hitBy(TransitionBlock transitionBlock) {
		// empty
	}
}